package org.jadelyre.core;

import org.jadelyre.core.codec.Packet;
import org.jadelyre.core.worker.Worker;

import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;

public interface Channel {

    JadeLyre getJadeLyre();

    NodeAddress getRemoteNodeAddress();

    //    DecodeTask getDecodeTask();
//    HandleTask getHandleTask();
//    SendTask getSendTask();
    Worker<ByteBuffer> getDecodeWorker();

    Worker<Packet> getHandleWorker();

    Worker<Packet> getSendWorker();

    void close();

    ReadCompletionHandler getReadCompletionHandler();

    WriteCompletionHandler getWriteCompletionHandler();

    AsynchronousSocketChannel getAsynchronousSocketChannel();
}
